<%= javascript_include_tag :fckeditor %>
<script type="text/javascript">
window.onload = function()
{
    var oFCKeditor = new FCKeditor('message_content', '100%', '120', 'FreeMode', '' )
    oFCKeditor.ReplaceTextarea() ;
}
</script>
<div id="myWall">
    <table class="columnHeader" width="100%" cellspacing="0" cellpadding="5">
        <tr>
            <td>
                <div class="columnTitle">
                    我的聊天板</div>
            </td>
        </tr>
    </table>
    <div id="wallPosts">
        <!--发送表单-->
        <%= form_tag(:controller => "message",:action => "Send")%>
        <table class="wallPostForm" width="100%" cellspacing="3" cellpadding="0">
            <tr>
                <td>
                    <% if @quoteMessage %>
                    <div class="wallQuoteDisplay">
                            <strong>引用内容:</strong>
                            <div class="wallQuoteFromDisplay">
                            <%=@quoteMessage.sender.username %> <%=@quoteMessage.sendDatetime.strftime("%Y-%m-%d %I:%M%p")%> 说道
                            </div>
                            <div class="wallQuoteContentDisplay">
                            <%=@quoteMessage.content %>
                            </div>
                    </div>
                    <%=hidden_field(:message, :quote_message_id, :value=>@quoteMessage.id)%>
                    <% end %>
                </td>
            </tr>
            <tr>
                <td>
                    <%=text_area "message","content",:cols=>46,:rows=>4 %>                                               
                </td>
            </tr>
            <tr>
                <td>
                    
                    <label for="message_isPrivate">
                         <%= check_box("message","isPrivate",{},"true", "false") %>私秘
                    </label>
                    <%= submit_tag "提交",:class=>"btn"%>
                </td>
            </tr>
        </table>
        <%= hidden_field(:message, :receiver_id, :value=>@params[:id])%>
        <%= end_form_tag %>
        
        <%= render_partial("/message/messageList")%>
        <div class="pager">
            <ul>
                <% for page in @message_pages %>
                    <%=
                    if page==@message_pages.current()
                        "<li class='currentPage'>#{page.number}</li>"
                    else
                        "<li><a href = '/home/index/#{@params[:id]}?page=#{page.number}&blogPage=#{@params[:blogPage]}' >#{page.number}</a></li>"
                    end
                    %>
                <% end %>
            </ul>
        </div>
    </div>
</div>